<!--
 * @Author: wu07 1732042133@qq.com
 * @Date: 2023-01-15 18:07:48
 * @LastEditors: wu07 1732042133@qq.com
 * @LastEditTime: 2023-02-02 16:04:00
 * @FilePath: \recruitAPP\recruitApp\recruitApp\src\pages\user\PostsDetail.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 视图层 -->
<template>
  <van-nav-bar
    title="职位详情"
    left-text="返回"
    left-arrow
    @click-left="onClickLeft"
  />
  <div class="name">
    <span>{{ arr.name }}</span>
    <span>{{ arr.money }}</span>
    <div>
      <span>{{ arr.city }}</span
      ><span>|</span><span>{{ arr.time }}</span
      ><span>|</span><span>{{ arr.degree }}</span>
    </div>
  </div>
  <div class="introduce">
    <span>职位描述</span>
    <p>{{ arr.introduce }}</p>
  </div>
  <div class="company">
    <span>公司简介</span>
    <div>
      <span>{{ arr.company }}</span
      ><span>{{ arr.people }}</span>
      <p>{{ arr.description }}</p>
    </div>
  </div>
</template>
<!-- 逻辑层 -->
<script setup>
import { get, post, put, del } from "~/axios/http";
import { showDialog } from "vant";
import { ref, reactive } from "vue";
// 导入useRouter方法
import { useRouter, useRoute } from "vue-router";
const router = useRouter();
const route = useRoute();
// 返回上一页
const onClickLeft = () => {
  router.go(-1);
};
const arr = ref({});
async function find() {
  let data = reactive({
    id: route.query.id,
  });
  let res2 = await get(`/api/infomation2/${data.id}`);
  arr.value = res2.data;
  console.log(arr.value);
}
find();
</script>
<!-- 样式层 -->
<style  scoped>
.name {
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-bottom: 2px solid #e4e4e4;
  border-top: 2px solid #e4e4e4;
  padding-bottom: 2.6667vw;
}
.name > span:nth-child(1) {
  font-weight: bold;
  margin: 2.6667vw 0;
}
.name > span:nth-child(2) {
  font-size: 5.3333vw;
  color: #09ba72;
  margin-bottom: 2.6667vw;
}
.name > div span {
  margin-right: 1.3333vw;
}
.introduce {
  width: 90%;
  margin: 0 auto;
  padding-top: 2.6667vw;
  border-bottom: 2px solid #e4e4e4;
}
.introduce span {
  font-weight: bold;
}
.company {
  width: 90%;
  margin: 0 auto;
  padding-top: 2.6667vw;
  border-bottom: 2px solid #e4e4e4;
  display: flex;
  flex-direction: column;
  margin-bottom: 10.3333vw;
}
.company > span:nth-child(1) {
  font-weight: bold;
  margin: 2.6667vw 0;
}
.company div span:nth-child(1) {
  margin-right: 5.3333vw;
}
</style>